package TP2;

import java.io.*;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

public class LeerDatos {

    public static void main(String[] args) {
        double vector[] = new double[400];
        int i = 0;
        FileInputStream f = null;
        
        try {
            f = new FileInputStream("D:\\Documentos backup windows8\\Carrera\\Simulación\\datos.txt");
            Scanner s = new Scanner(f);

            while (s.hasNextInt()) {
                vector[i] = (double)s.nextInt();
                i++;

            }


        } catch (FileNotFoundException ex) {
            Logger.getLogger(LeerDatos.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                f.close();
            } catch (IOException ex) {
                Logger.getLogger(LeerDatos.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        for (double j : vector) {
            System.out.println(j + "\n");
        }
    }

}
